{% layout="admin_layout.html" %}
{-jsorcss-}
<script language="JavaScript" src="/static/ckeditor/ckeditor.js"></script>
{-jsorcss-}
{-title-}
{(admin.articles/menu.html)}
{-title-}
{-content-}
<form class="form-signin" action="{*url*}" method="POST">
    <h2 class="form-signin-heading">写文章</h2>
    {%if article['id'] and article['id']>0 then%}
    <input type="hidden" name="id" value="{{article['id']}}">
    {%end%}
    <input type="text" name="title" value="{{article['title']}}" class="input-block-level" placeholder="文章标题">
    <textarea id="content" rows="7" name="content" class="input-block-level" placeholder="文章内容">{{article['content']}}</textarea>
    <div style="height: 15px;"> </div>
    {% for k,t in pairs(tags) do%}
        <div class="span2"><label><input name="tags[]" type="checkbox" value="{{t['id']}}" {%if helper:in_table(t['id'],tids) then%} checked {%end%}> {{t['tag_name']}} </label></div>
    {%end%}
    <div style="height: 15px;clear: both;"> </div>
    <button class="btn btn-large btn-primary clearfix" type="submit">提交</button>
</form>
<script language="JavaScript">
    <!--
    CKEDITOR.replace( 'content');
    //-->
</script>
{-content-}